import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Injectable({
  providedIn: 'root',
})
export class AuthService {

  constructor(
      private http: HttpClient,
  ) {
  }

  initialConfig() {
    return this.http.get(`/api/common/initial`);
  }

  register(param: any) {
    return this.http.post(`/api/user/register`, param);
  }

  modifyUserInfo(model: any) {
    return this.http.post(`/api/user/modifyInfo`, model);
  }

  forget(data: any) {
    return this.http.post(`/api/user/forget`, data);
  }

  changePassword(model: any) {
    return this.http.post(`/api/user/changePassword`, model);
  }
}
